package com.two.service.order.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.two.service.order.entity.Orders;
import com.two.service.order.vo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 汪瑞明
 * @since 2022-09-01
 */
@Mapper
@Component
public interface OrdersMapper extends BaseMapper<Orders> {


    int updateState(@Param("ordersid") String tradeNo, @Param("status") String state,@Param("paymentTime") String gmtPayment,@Param("alipayNo") String alipayTradeNo);

    Orders getByNo(@Param("alipayNo") String traceNo);

    int updatePayState(@Param("alipayNo")String traceNo,@Param("status") String s,@Param("rebackTime") String now);


    List<ConfirmPayVo> selectOrder(@Param("usermonicker") String usermonicker);


    List<VegetableVo> selectVegetableVo(@Param("usermonicker") String usermonicker);

    List<PhoneOrdersVo> selectOrders(@Param("usermonicker")String usermonicker);

    int updateCommentStatus( @Param("ordersid")  String ordersid,@Param("dishName") String dishName, @Param("rid") Integer rid,@Param("usermonicker") String usermonicker);

    int updateProductCode(String oid);

    int updateOrdersStutes  (@Param("ordersid")String ordersid);


    List<StatisticVo> findMoney();

    List<StatisticGoodsVo> selectGoods(Integer rid);
}
